/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.me.mjw.rememome;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.widget.TabHost;
import org.me.mjw.rememome.activity.AddActivity;
import org.me.mjw.rememome.activity.ListFrameActivity;
import org.me.mjw.rememome.activity.StatusActivity;

/**
 *
 * @author MWaldman
 */
public class MainActivity extends TabActivity
{

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle icicle)
    {
        super.onCreate(icicle);
        setContentView(R.layout.main);
        // ToDo add your GUI initialization code here
        Resources res;
        TabHost tabHost;
        TabHost.TabSpec spec;
        Intent intent;
        Drawable drawable;

        res = getResources();
        tabHost = getTabHost();
        // Tab for List Memo
//        intent = new Intent().setClass(this, ListActivity.class);
        intent = new Intent().setClass(this, ListFrameActivity.class);
        drawable = res.getDrawable(R.drawable.ic_tab_list);
        spec = tabHost.newTabSpec("list").setIndicator("List", drawable).setContent(intent);
        tabHost.addTab(spec);

        // Tab for Add Memo
        intent = new Intent().setClass(this, AddActivity.class);
        drawable = res.getDrawable(R.drawable.ic_tab_add);
        spec = tabHost.newTabSpec("add").setIndicator("Add", drawable).setContent(intent);
        tabHost.addTab(spec);

        // Tab for Status Memo
        intent = new Intent().setClass(this, StatusActivity.class);
        drawable = res.getDrawable(R.drawable.ic_tab_status);
        spec = tabHost.newTabSpec("status").setIndicator("Status", drawable).setContent(intent);
        tabHost.addTab(spec);

        tabHost.setCurrentTab(0);
    }
}
